package com.xci.platform.web.core;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 系统配置
 */
@Component
@ConfigurationProperties(prefix = "system")
public class PlatformSetting {

    /**
     * 登录地址
     */
    @Getter
    @Setter
    private String loginPath = "/login";

    /**
     * 404错误页
     */
    @Getter
    @Setter
    private String error404Path = "/error/error404";

    /**
     * 500错误页
     */
    @Getter
    @Setter
    private String error500Path = "/error/error500";

    /**
     * 文件上传路径
     */
    @Getter
    @Setter
    private String uploadPath = "/upload/";

    /**
     * 排除用户认证路径
     */
    @Getter
    private String[] excludeAuthPath = new String[]{"/static/**", "/upload/**"};

    public void setExcludeAuthPath(String... excludeAuthPath) {
        this.excludeAuthPath = excludeAuthPath;
    }
}
